When a window with a text-entry at the bottom that had triggered the OSK
and was shifted up to avoid overlapping the OSK is closed right after
losing keyboard focus, this results in a crash. The focus loss triggers
the animation to move the window actor back into its original position,
which moves the underlying window when finished. That however will fail
when the window has been unmanaged and some of the underlying resources
have already been destroyed while the animation was playing.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8752
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3933>
(cherry picked from commit
4900aad2deab7398e69b1a57a38285fa73974c0f)
? this._focusWindowStartY - Main.layoutManager.keyboardBox.height
: this._focusWindowStartY;
+ let unmanaged = false;
+ const winUnmanagedId = window.connect('unmanaged', () => {
+ unmanaged = true;
+ });
+
windowActor.ease({
y: finalY,
duration: KEYBOARD_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onStopped: () => {
+ window.disconnect(winUnmanagedId);
+
+ if (unmanaged)
+ return;
+
windowActor.y = finalY;
this._windowSlideAnimationComplete(window, finalY);
},